<?php
/**
 * This file contains the class AlertsCheckView which provides
 * all of the text requirements for checking an alert
 *
 * @copyright  2009 A Memory Tree
 * @license    A Memory Tree License
 * @version    $Id:$
 */
/**
 * This class provides the text for AlertsCheckView
 *
 * @copyright  2009 A Memory Tree
 * @license    A Memory Tree License
 * @version    Release: @package_version@
 */
class AlertsCheckView
{
    /**
     * The html class that provides helpers to display the text
     *
     * @var Html
     */
    private $_html;
    /**
     * Builds the list of text messages
     * 
     * @return void
     * @param Html &$html
     */
    public function __construct(&$html)
    {
        $this->_html = $html;
    }
    /**
     * List a person
     *
     * @return string
     * @param string $firstName
     * @param string $lastName
     */
    public function person($firstName, $lastName)
    {
        return $firstName.' '.$lastName;
    }
    /**
     * The email subject
     *
     * @return string
     * @param string $fullName
     */
    function subject($fullName)
    {
        return 'Matching alert for '.$fullName.' at www.amemorytree.co.nz';
    }
    /**
     * Provide the notification message about adding a person
     *
     * @return string
     * @param int $personId
     * @param string $fullName
     * @param string $people
     * @param string $expiryDateOption
     */
    public function message($personId, $fullName, $people, $expiryDateOption)
    {
        return <<< EOT
        <p>Hi,</p>
        <p>A possible match for your search has been listed at <a href="http://www.amemorytree.co.nz">www.amemorytree.co.nz</a></p>
        <p><strong>Your search was for</strong> $people</p>
        <p><strong>The match we've listed today is</strong> -</p>
        <p><a href="http://www.amemorytree.co.nz/remembrance.php?personid=$personId">$fullName</a></p>
        <p>Click on the above link to view the details.</p>
        <p><strong><span style="color: red">If this is the person</span></strong> you are searching for - Delete future alerts by <a href="http://www.amemorytree.co.nz/member.php?return=/alerts.php">logging in</a> to your account and deleting the alert.</p>
        <p><strong><span style="color: red">If this is not the person</span></strong> you are searching for - You will continue to receive emails every time a possible match is listed until your search expires$expiryDateOption.</p>
        <p>Thank you for using A Memory Tree for your search.</p>
        <p>Kind regards</p>
        <p>The Team</p>
        <p><a href="http://www.amemorytree.co.nz">www.amemorytree.co.nz</a></p>
        <p>Create, remember, enjoy, learn, share & discover...</p>
        <p>A Memory Tree Limited &copy; 2006-2009<br>
            <a href="http://amemorytree.co.nz/terms.php">Terms</a>
            <a href="http://amemorytree.co.nz/privacy.php">Privacy</a>
            <a href="http://amemorytree.co.nz/codeofethics.php">Code of Ethics</a>
            <a href="http://amemorytree.co.nz/safety.php">Safety</a>
            <a href="http://amemorytree.co.nz/aboutus.php">About</a>
            <a href="http://amemorytree.co.nz/contactus.php">Contact Us</a></p> 
        </p>

EOT;
    }
}
?>
